Change in openvpn[master]: dco: ignore key transition window logic
A message that is not in the archive (sent off-list or not yet received): gerrit.1768848003000.I3d506725e69c09a9c77d6a9ba71a00e112e7abb6@...2715...
Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/1479?usp=email
to review the following change.
Change subject: dco: ignore key transition window logic
......................................................................
dco: ignore key transition window logic
Userspace enforces a transition window when moving to a new key, which involves renegotiating the key, installing it as a secondary one, and waiting for an interval before fully adopting it. Although the DCO part of this mechanism is set up in userspace, none of the drivers actually implements it in the kernel.
Therefore we ignore the transition window and treat the newly installed key as the primary one, allowing userspace to negotiate, install, and swap it immediately.
Change-Id: I3d506725e69c09a9c77d6a9ba71a00e112e7abb6
---
M src/openvpn/dco.c
M src/openvpn/forward.c
2 files changed, 11 insertions(+), 0 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/79/1479/1
src/openvpn/dco.c +9 -0
@@ -78,6 +78,15 @@ multi->dco_keys_installed++; ks->dco_status = (slot ==OVPN_KEY_SLOT_PRIMARY ) ?DCO_INSTALLED_PRIMARY :DCO_INSTALLED_SECONDARY ; + +/* TODO: currently none of the DCO drivers support a transition +* window when moving to a new key, so we need this hack to +* trick userspace into thinking that the newly installed key is the +* primary one (see dco_update_keys). +* This line should be removed once all drivers implement the +* transition window logic. +*/ + ks->auth_deferred_expire = now; }return ret;
src/openvpn/forward.c +2 -0
@@ -221,6 +221,8 @@* on ks->auth_deferred_expire that DCO needs to check that the normal * TLS state engine does not check. So we call the \c check_dco_key_status * function even if tmp_status does not indicate that something has changed. +* +* TODO: this logic is missing on the kernel side. */ check_dco_key_status (c);
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1479?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I3d506725e69c09a9c77d6a9ba71a00e112e7abb6
Gerrit-Change-Number: 1479
Gerrit-PatchSet: 1
Gerrit-Owner: ralf_lici <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Attention is currently required from: ralf_lici.
plaisthos has posted comments on this change by ralf_lici. ( http://gerrit.openvpn.net/c/openvpn/+/1479?usp=email )
Change subject: dco: ignore key transition window logic
......................................................................
Patch Set 1: Code-Review-2
(1 comment)
Patchset:
PS1:
Quoted 3 lines
Although the DCO part
of this mechanism is set up in userspace, none of the drivers actually implements it in the kernel.
We implement this with secondary and primary key for the kernel as well. OpenVPN assume that the primary key is always used for encryption and that the secondary key can be used for decryption.
Currently dco_update_keys also installs the new negotiated key first as secondary key and then only when it becomes the primary key we call dco_swap_keys. Which we do after the transition period. So we basically have this transition period in user space.
Which part of that is not implemented in kernel space? Is secondary ignored or what? The commit is missing what part exactly is not implemented in the DCO drivers here.
If you ignore the period and switch to the new key as soon as you get it, you get packet loss as there is no way around a packet loss unless you have a transition period where both keys are active for decryption.
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1479?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I3d506725e69c09a9c77d6a9ba71a00e112e7abb6
Gerrit-Change-Number: 1479
Gerrit-PatchSet: 1
Gerrit-Owner: ralf_lici <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: ralf_lici <[email protected]...>
Gerrit-Comment-Date: Mon, 19 Jan 2026 19:13:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Attention is currently required from: ralf_lici.
plaisthos has posted comments on this change by ralf_lici. ( http://gerrit.openvpn.net/c/openvpn/+/1479?usp=email )
Change subject: dco: ignore key transition window logic
......................................................................
Patch Set 1:
(1 comment)
File src/openvpn/dco.c:
http://gerrit.openvpn.net/c/openvpn/+/1479/comment/9f0beabf_e536a1e8?usp=email :
PS1, Line 89: ks->auth_deferred_expire = now;
This will instantly trigger the key to be installed as primary key, breaking the normal transition method for tls renegotiation.
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1479?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I3d506725e69c09a9c77d6a9ba71a00e112e7abb6
Gerrit-Change-Number: 1479
Gerrit-PatchSet: 1
Gerrit-Owner: ralf_lici <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: ralf_lici <[email protected]...>
Gerrit-Comment-Date: Mon, 19 Jan 2026 22:46:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
ralf_lici has abandoned this change. ( http://gerrit.openvpn.net/c/openvpn/+/1479?usp=email )
Change subject: dco: ignore key transition window logic
......................................................................
Abandoned
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1479?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: abandon
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I3d506725e69c09a9c77d6a9ba71a00e112e7abb6
Gerrit-Change-Number: 1479
Gerrit-PatchSet: 1
Gerrit-Owner: ralf_lici <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>